#!/usr/bin/env python
# -*- coding: utf-8 -*-

from rest_framework import viewsets, response, status, mixins

from ..models import ArticleModels
from ..serializers import ArticleWxXCXSerilizer


class WxXCXArticleViews(viewsets.GenericViewSet, 
                        mixins.RetrieveModelMixin,
                        mixins.ListModelMixin ):

    queryset = ArticleModels.objects.filter(enabled=True)
    serializer_class = ArticleWxXCXSerilizer
    filterset_fields = ["author", "tags", "series", "station"]
    search_fields = ["title"]
